<!DOCTYPE html>
<html>
<head>
<title>运动</title>
<meta charset="UTF-8" />
<meta content="telephone=no" name="format-detection">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<link rel="stylesheet" href="{{ URL::asset('weixin/v1/css/main_style.css') }}" />
<link rel="stylesheet" href="{{ URL::asset('weixin/v1/css/pedometer/index.css') }}" />
<script src="{{ URL::asset('weixin/v1/js/main.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('weixin/v1/js/pedometer/index.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('weixin/v1/js/socket.io.js') }}"></script>
<style type="text/css">
#message{
	position:fixed;
	top:0px;
	left:0px;
	width:100%;
    height: 30px;
    background: #656565;
    padding-top: 10px;
    padding-bottom:10px;
    display:none;
    z-index: 101;
}
#message-content{
    color: #fff;
    font-size: 14px;
    margin-left:10%;
    width:80%;
    float:left;
    height: 30px;
    line-height: 30px;
}
#message .close{
	float:left;
	text-align: center;
	margin-top:5px;
	margin-left:-5%;
	width:8%;
	 display:none;
}
  
</style>
</head>
<body id="bod" onorientationchange="banOrientation();">
	<input type="hidden" id="memberId" value="00bd2e9abb4c46a298eb6b2962dbaf3a">
	<input type="hidden" id="accountId" value="cc10423f4a604e568a62b58dcb44ea8e">
	<input type="hidden" id="hidden_memberId" name="memberId" value="00bd2e9abb4c46a298eb6b2962dbaf3a" />
	<input type="hidden" id="hidden_memberHeight" name="memberHeight" value="179.0" />
	<input type="hidden" id="hidden_memberWeight" name="memberWeight" value="75.0" />
	<input type="hidden" name="accountId" id="hidden_accountId" value="cc10423f4a604e568a62b58dcb44ea8e" />
	<input type="hidden" id="timeType" value="1" />
	<input type="hidden" id="startTime" value="1435939200000" />
	<input type="hidden" id="openId" value="ouz52jiY7gfJd3vK-9K6T9mBRPuo" />
	<input type="hidden" id="token" value="" />

	<input type="hidden" id="deviceBindingState" value="3" />


	
	<!-- 主体框架 -->
	<div id="container">
	
		<!-- 消息 -->
	<div id="message">
		<div id="message-content">未绑定任何手环设备</div>
		<div id="message-close" class="close">
			<img alt="" src="/weixin/v1/img/x.png" style="width:15px;height:15px">
		</div>
	</div>
	
		<div id="other">
			<!-- 顶部按钮＋标题 -->
			<div id="btn_top_left">
				<img src="/weixin/v1/img/champion3.png" style="max-width: 34px; max-height: 34px;">
			</div>

			<!-- 前后按钮 -->
			<div id="btn_back">
				<img style="max-height: 30px;" id="back_pedometer" src="/weixin/v1/img/left.png">
			</div>
			<div id="btn_forward">
				<img style=" max-height: 30px;" id="forward_pedometer" src="/weixin/v1/img/right.png">
			</div>

			<div id="btn_top_right">
				<div class="head_text" id="head_text">天</div>
			</div>
			<div id="title_top">今天</div>

			<div id="container_circle">
				<!-- 圆环  -->
				<div id="roundBox_big_step" class="roundBox_big">
					<canvas id="canvas_pedometer" class="canvasBox_pedometer"></canvas>
					
					<div class="panel" id="pedometer_upload">
					    <div class="scanner"></div>
					</div>
					<div class="yuan"></div>
					<label id="data_none">无运动记录</label> 
					<label id="data_pedometer">0</label> 
					<label id="data_stepPercent">0%</label> 
					<label id="data_text">步数</label>
				</div>
			</div>
			<!-- 圆环下方2～3个文本数据框 -->
			<div id="container_circle_item">
				<div id="container_circle_item_left">
					<font id="step_value">0</font><br />步数
				</div>
				<div id="container_circle_item_center">
					<font id="distance_value">0</font><br />公里
				</div>
				<div id="container_circle_item_right">
					<font id="calories_value">0</font><br />大卡
				</div>
			</div>
		</div>
		<!-- 这线图 onclick="chartEvent(event)"-->
		<div id="container_chart" style="background: #f5f5f5;">
			<div id="popupArrow">
				<!-- <p id="popupText"></p> -->
			</div>
			<div id="popupLine"></div>
			<canvas id='canvasBox_0' class="canvasBox_pedometer_chart"></canvas>
		</div>
	</div>
	<!-- 添加目标步数弹出框 -->
	
	<div id="alert_pedometerGoal" class="alert_pedometerGoal">
		<div style="height: 120px;">
			<div class="alert_pedometerGoal_cancel">
				<div id="alert_pedometerGoal_close" class="alert_pedometerGoal_cancel_btn">取消</div>
			</div>
			<div class="alert_pedometerGoal_ok">
				<div id="alert_pedometerGoal_save" class="alert_pedometerGoal_ok_btn">确定</div>
			</div>
			<div class="alert_pedometerGoal_title">每天目标</div>
		</div>
		<div style="height: 140px;">
			<div class="alert_pedometerGoal_step_left" id="alert_value_reduce"><div class="alert_pedometerGoal_step_left_jian"></div>
				
			</div>
			<div class="alert_pedometerGoal_step_div">
				<div class="alert_pedometerGoal_step">
					<font id="alert_pedometerGoal_value">0</font>步
					<!-- <div class="text_box">
			 	<input type="number" id="alert_pedometerGoal_value" value="0" disabled="disabled" />
			 </div> -->
				</div>
				<div class="alert_pedometerGoal_level">
					<img id="alert_pedometerGoal_level_ico" src="/weixin/v1/img/foot_great.png" width="44" height="44">
				</div>
			</div>
			<div class="alert_pedometerGoal_step_right" id="alert_value_plus">+
				
			</div>
		</div>
		<div class="alert_pedometerGoal_text" id="alert_pedometerGoal_text">
			约走路<font id="alert_pedometerGoal_walkingTime_h">0小时</font>
				<font id="alert_pedometerGoal_walkingTime_m">0分</font>
		</div>
		<!-- foot 目标步数 -->
		<div class="alert_pedometerGoal_footer_text" id="alert_pedometerGoal_footer_text">
			距离<font id="alert_pedometerGoal_TD">0米</font>
				，热量消耗<font id="alert_pedometerGoal_Calories">0千卡</font>
		</div>
		<!--, 或跑步约<font id="alert_pedometerGoal_runningTime_h">0小时</font><font
		id="alert_pedometerGoal_runningTime_m">0分</font> -->
	</div>
	<!-- /添加目标步数弹出框 -->
	<!-- loader图片 -->
	<div id="ajaxLoader" style="top:40%;">
		<img src="/weixin/v1/img/sleep/ajax-loader.gif" style="border-radius: 46px;" />
	</div>
	<!-- 底部导航栏 -->
	
	
	<!-- 隐藏微信右上角菜单 -->

<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="{{ URL::asset('weixin/v1/js/weixin_signature_api.js') }}"></script>

</body>
<script language="JavaScript">

	var ctx = "";
	/*document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
		WeixinJSBridge.call('hideOptionMenu');
	}); */
	
	//初始化
	window.onload = function(){
		wxcheckWXSignature();
		document.getElementById("pedometer_upload").style.display="none";
		var deviceBindingState=document.getElementById("deviceBindingState").value;
		console.log("deviceBindingState "+deviceBindingState); //deviceBindingState 3
		var headMsg=document.getElementById("message");
		if(deviceBindingState==3){
			closeMessage();
		}else if(deviceBindingState==4){
			
			headMsg.style.display="block";
			document.getElementById("message-close").style.display="block";
		}else{
			headMsg.style.display="block";
			document.getElementById("message-close").style.display="block";
			setTimeout("closeMessage()",5000);
		}
		init();
		var name=navigator.platform;
		console.log("platform "+ name.substring(0, 6));
		if(name.substring(0, 6)=="iPhone"||name.substring(0, 4)=="iPod"||name.substring(0, 4)=="iPad"){
			init_iphone_onclick();
		}else{
			init_other_onclick();
			initContainerDefaultClickEvent();
		}
		
		drawCircle_pedometer("canvas_pedometer", 0,1);
		ajaxLoadPedometerRecord();
	};
	
	
</script>
</html>